<?php
session_start();
include "config.php";
$username = mysql_escape_string($_POST["username"]); 
$password = mysql_escape_string($_POST["password"]);

$checkDB = mysql_query("SELECT * FROM datauseradmin where username = '$username' AND password = '$password'");
$jumlahData = mysql_num_rows($checkDB);
//echo $jumlahData;
if($jumlahData > 0)
{
		while($row = mysql_fetch_array($checkDB)){
		$_SESSION['id']= $row['id'];
		$_SESSION['username']=$row['username'];
		$_SESSION['time']=time();
		}
		header('location:adminberanda.php');
}
 else {
	
    	 header('location:loginadmin2.php');
}